From: Florian Eckert Date: Thu, 28 Oct 2021 13:43:50 +0000 (+0200) Subject: luci-mod-system: move default option from defaul-on trigger to none trigger X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=7a677b1fdefb120c2628aec310f0508f411be9e8;p=project%2Fluci.git luci-mod-system: move default option from defaul-on trigger to none trigger Signed-off-by: Florian Eckert (cherry picked from commit 5b42cd5b46c32bf168b7156602bfa0ba841904a1) --- diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js index ba7b00ede3..b9713cef1c 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/default-on.js @@ -7,15 +7,5 @@ return baseclass.extend({ kernel: true, addFormOptions(s){ var o; - - o = s.option(form.Flag, 'default', _('Default state')); - o.rmempty = false; - o.depends('trigger', 'default-on'); - o.textvalue = function(section_id) { - var cval = this.cfgvalue(section_id); - if (cval == null) - cval = this.default; - return (cval == this.enabled) ? _('On') : _('Off'); - }; } }); diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js index ef21adc7dc..8542a6cda7 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js +++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/led-trigger/none.js @@ -6,5 +6,15 @@ return baseclass.extend({ kernel: true, addFormOptions(s){ var o; + + o = s.option(form.Flag, 'default', _('Default state')); + o.rmempty = false; + o.depends('trigger', 'none'); + o.textvalue = function(section_id) { + var cval = this.cfgvalue(section_id); + if (cval == null) + cval = this.default; + return (cval == this.enabled) ? _('On') : _('Off'); + }; } });